﻿cms.Ajax = function () {

    var _prm;

    function _init() {
        _prm = Sys.WebForms.PageRequestManager.getInstance();
    }

    function _addInitializeRequestHandler(handler) {
        _prm.add_initializeRequest(handler);
    }

    function _addEndRequestHandler(handler) {
        _prm.add_endRequest(handler);
    }

    function _isInAsyncPostBack() {
        return _prm.get_isInAsyncPostBack();
    }

    return {
        Init: _init,
        AddInitializeRequestHandler: _addInitializeRequestHandler,
        AddEndRequestHandler: _addEndRequestHandler,
        IsInAsyncPostBack: _isInAsyncPostBack
    }

} ();
